package ar.com.cema.methodology.analyzer.services.beans;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

import ar.com.cema.methodology.analyzer.model.Variable;

public class ProjectConfiguration {
	private Map<Variable, Integer> userConfiguration = new HashMap<Variable, Integer>();
	
	public void addVariable(Variable variable, Integer input) {
		this.userConfiguration.put(variable, input);
	}

	public Map<Variable, Integer> getUserConfiguration() {
		return userConfiguration;
	}

	public boolean exceedsMaximumInput() {
		Set<Variable> keySet = userConfiguration.keySet();
		Integer totalValue = 0;
		
		for (Variable variable : keySet) {
			totalValue += userConfiguration.get(variable);
		}

		if ( totalValue > 100 ) {
			return true;
		} else {
			return false;
		}
	}
}
